﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BW.MesProject.Public.Domain.RBAC
{
    /// <summary>
    /// 用户实体
    /// </summary>
    [SugarTable("UserModel")]
    public class UserModel:BaseEntity
    {
        /// <summary>
        /// 账号
        /// </summary>
        [SugarColumn(IsNullable =false)]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(IsNullable = false)]
        public string Password { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        [SugarColumn(IsNullable = false)]
        public string RealName { get; set; }


        /// <summary>
        /// 角色Id(外键)
        /// </summary>
        //[SugarColumn(IsNullable = true)]
        //public long RoleId { get; set; }

        ///// <summary>
        ///// 角色导航属性
        ///// </summary>
        //[Navigate(NavigateType.OneToOne, nameof(RoleId))]
        //[SugarColumn(IsIgnore = true)] // 告诉SqlSugar这不是数据库字段
        //public RoleModel Role { get; set; }

    }
}
